package cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.controller;

import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.entity.ParticipatingConference;
import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.service.ParticipatingConferenceService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;



/**
 * @author 张烁瑜
 * @Date 2025/5/20 20:31
 */

@RestController
@RequestMapping("/participationConference")
public class ParticipationConferenceController {

    @Autowired
    private ParticipatingConferenceService participatingConferenceService;

    @PostMapping
    public String save(@RequestBody ParticipatingConference participationConference) {
        return participatingConferenceService.save(participationConference);
    }

    @PutMapping
    public String update(@RequestBody ParticipatingConference participationConference) {
        return participatingConferenceService.update(participationConference);
    }

    @DeleteMapping("/{participationConferenceId}")
    public String delete(@PathVariable Long participationConferenceId) {
        return participatingConferenceService.delete(participationConferenceId);
    }

    @GetMapping
    public PageInfo<ParticipatingConference> get(int pageNum, int pageSize, ParticipatingConference participatingConference) {
        return participatingConferenceService.get(pageNum,pageSize,participatingConference);
    }


}
